import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Styles 1.4

Item {

    id:checkBoxComponentItem

    property alias text: checkBox.text
    property alias checked: checkBox.checked

    CheckBox {

        id:checkBox
        CheckBoxStyle {
            indicator: Rectangle {
                implicitWidth:  25
                implicitHeight:  25
                radius: 3
                color:"transparent"
                border.color: control.checked ? "#6495ED" : "#696969"
                border.width: 1

                Rectangle {
                    visible: control.checked
                    color: "#6495ED"
                    border.color: "#6495ED"
                    radius: 1
                    anchors.margins: 4
                    anchors.fill: parent
                }
            }


            background: Rectangle
            {
                color:"transparent"
            }

            label: Text
            {
                id: titleText
                text:control.text
                color: control.checked?"#6495ED" : "#696969"
                font.family: "微软雅黑"
                font.pointSize:  14
                leftPadding: 5
            }
        }
    }

}
